<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>    
    <title>Role列表</title>    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">
	<link href="/oa/css/style.css" rel="stylesheet" type="text/css">
	<script src="/oa/script/common.js"></script>
	<script type="text/javascript">
		function deleteRole(id,name){
			var sure = confirm("确定删除:"+name+" ？" + '<s:url action="delRole" namespace="/sysmanage" />?role.roleId='+id);
			if(sure){
				window.location.href='<s:url action="delRole" namespace="/sysmanage" />?role.roleId='+id;
			}
		}
	</script>
  </head>
  <body>
	<div class="page_title">&nbsp;角色管理</div>
	<s:fielderror></s:fielderror>
	<div class="button_bar">
		<button class="common_button" onclick="alert('暂无');">帮助</button>
		<button class="common_button" onclick="location.href='/oa/page/sysmanage/addRole.jsp';">创建新角色</button>  
	</div>
	
	<table class="data_list_table">
		<tr>
			<th>编号</th>
			<th>角色名称</th>
			<th>角色说明</th>
			<th>修改</th>
			<th>删除</th>
		</tr>
		<s:iterator value="pageView.records" status="entry">
			<tr>			
				<td class="list_data_number">${roleId}</td>
				<td class="list_data_text">${name}</td>
				<td class="list_data_ltext">${description }</td>
				<td class="list_data_text"><img 
					onclick="location.href='<s:url action="showRole" namespace="/control/sysmanage"><s:param name="role.roleId" value="roleId"/></s:url>'" 
					title="编辑" src="/oa/images/bt_edit.gif" class="op_button" /></td>
				<td class="list_data_text"><img onclick="deleteRole('${roleId}','${name}')" title="删除" src="/oa/images/bt_del.gif" class="op_button" /></td>
				
			</tr>
		</s:iterator>			
		
		
		<tr>
			<th colspan="7" class="pager">
				<div class="pager">
					共<s:property value="pageView.totalrecord"/>条记录 
				</div>
			</th>
		</tr>
	</table>
	</body>
</html>
